user="tom"
password="tom123"
a = 3

while a:
    a -= 1
    if user == input("username:")and password == input("password:"):
            print("登录成功")
            break
    else:
        print("用户名或密码错误")